

#include "camera.h"

#include <stdlib.h>
#include <string.h>


void vm_set_cam_loc(vm_camera *cam, vm_vector v){

  cam->location = v;

}

void vm_set_cam_look(vm_camera *cam, vm_vector v){

  cam->look = v;

}

void vm_set_cam_size(vm_camera *cam, unsigned int x, unsigned int y){

  cam->x_len = x;
  cam->y_len = y;

}

vm_camera *vm_make_camera(){

  vm_camera *cam = (vm_camera *) malloc(sizeof(vm_camera));
  memset(cam, 0, sizeof(vm_camera));
  return cam;

}

void vm_free_cam(vm_camera *cam){

  free((void *) cam);

}
